package com.atguigu.mvc.controller;/*
@author joker
@create 2022-05-01 0:06
SpringMVCdemo01
*/

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import javax.ws.rs.GET;

@Controller
//@RequestMapping(value = "/Test" ) 标识到类上面,可以区分不同模块,因为处理方法的
// @RequestMapping的value值可能一样
public class RequestMappingController {
    @RequestMapping(value = {"/testRequestMapping", "/test"}, method = {RequestMethod.GET,RequestMethod.POST})
    public String success() {
        return "success";
    }
/*测试@GetMapping等等*/
    @GetMapping("/testGetMapping")
    public String testGetMapping(){return "success";}
    //测试ant风格的路径,对于@RequestMapping的value属性
    @RequestMapping("/a?a/testAnt")
    public String testAnt() {
        return "success";
    }

}
